﻿
@using CommonApp
@using IBS.Math
@model BankApp.Models.CreditCheckModel

@{
    ViewBag.Title = "Credit Check";
}

<h2>Check credit worthiness</h2>

<ul>
    @using (Html.BeginForm("Check", "CreditCheck"))
    {
        <b>
            <div class="editor-label">
                @Html.LabelFor(m => m.Worthiness, "Worthiness").If(Model.Worthiness != null)
                @Html.DisplayFor(m => m.WorthinessDescription).If(Model.Worthiness != null)
            </div>
        </b>
        
        <table>
            <tr>
                <td class="editor-label">@Html.LabelFor(m => m.Age, "Age:")</td> 
                <td class="editor-field">@Html.DropDownListFor(m => m.Age, HtmlHelpers.EnumToSelectList<Forecasting.Age>())</td>
            </tr>
            <tr>
                <td class="editor-label">@Html.LabelFor(m => m.PaymentHistory, "Payment History:")</td> 
                <td class="editor-field">@Html.DropDownListFor(m => m.PaymentHistory, HtmlHelpers.EnumToSelectList<Forecasting.PaymentHistory>())</td>
            </tr>
            <tr>
                <td class="editor-label">@Html.LabelFor(m => m.Income, "Income:")</td> 
                <td class="editor-field">@Html.DropDownListFor(m => m.Income, HtmlHelpers.EnumToSelectList<Forecasting.Income>(true))</td>
            </tr>
            <tr>
                <td class="editor-label">@Html.LabelFor(m => m.Assets, "Assets:")</td> 
                <td class="editor-field">@Html.DropDownListFor(m => m.Assets, HtmlHelpers.EnumToSelectList<Forecasting.Assets>(true))</td>
            </tr>
            <tr>
                <td class="editor-label">@Html.LabelFor(m => m.Reliability, "Reliability:")</td> 
                <td class="editor-field">@Html.DropDownListFor(m => m.Reliability, HtmlHelpers.EnumToSelectList<Forecasting.Reliability>(true))</td>
            </tr>
            <tr>
                <td class="editor-label">@Html.LabelFor(m => m.FutureIncome, "Future Income:")</td> 
                <td class="editor-field">@Html.DropDownListFor(m => m.FutureIncome, HtmlHelpers.EnumToSelectList<Forecasting.FutureIncome>(true))</td>
            </tr>
            <tr>
                <td class="editor-label">@Html.LabelFor(m => m.IncomeToDebtsRatio, "Income to debts ratio:")</td> 
                <td class="editor-field">@Html.DropDownListFor(m => m.Income, HtmlHelpers.EnumToSelectList<Forecasting.DebtRatio>(true))</td>
            </tr>
        </table>

        <ul><input type="submit" value ="Check"/></ul>
    }
</ul> 

@section css {
    <link href="@Url.Content("~/Content/CreditCheckStyles.css")" rel="stylesheet" type="text/css" />
}